using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input.Touch;

namespace rocketjump
{
    class TouchableSprite : Sprite
    {
        public bool wasTouched;

        public TouchableSprite(Vector2 position, float scale, Texture2D texture)
        {
            this.wasTouched = false;
        }

        public void UpdateTouchStates(TouchCollection touchCollection)
        {
            foreach (TouchLocation tl in touchCollection)
            {
                if (tl.State == TouchLocationState.Pressed && tl.Position == this.position)
                {
                    this.wasTouched = true;
                }
                else
                {
                    this.wasTouched = false;
                }
            }
        }
    }
}
